﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="OtherTelNo.ascx.vb" Inherits="WebForm_Form_OtherTelNo" %>
<asp:Panel ID="panel1" runat="server" BackColor="#E7FEC2" BorderWidth="1" Width="600px"
    Height="450px" ScrollBars="Auto">
    <asp:HiddenField ID="hiFormNo" runat="server" />
    <asp:HiddenField ID="hiKind" runat="server" />
    <asp:HiddenField ID="hidbName" runat="server" />
    <asp:ObjectDataSource ID="dbApplyDetail" runat="server" 
        SelectMethod="GetDetail" TypeName="Telecom.BBL.ApplyBBL" 
        UpdateMethod="InsertDetail">
        <UpdateParameters>
            <asp:ControlParameter ControlID="hiFormNo" Name="FormNo" PropertyName="Value" 
                Type="Int32" />
            <asp:Parameter Name="FactoryName" Type="String" ConvertEmptyStringToNull ="false" DefaultValue=""/>
            <asp:Parameter Name="Name" Type="String" ConvertEmptyStringToNull ="false" DefaultValue=""  />
            <asp:Parameter Name="TelNo" Type="String" ConvertEmptyStringToNull ="false" DefaultValue="" />
            <asp:Parameter Name="IDNo" Type="String" ConvertEmptyStringToNull ="false" DefaultValue="" />
            <asp:ControlParameter ControlID="hidbName" Name="dbName" PropertyName="Value" 
                Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="hiFormNo" Name="FormNo" PropertyName="Value" 
                Type="Int32" />
            <asp:ControlParameter ControlID="hiKind" Name="Kind" PropertyName="Value"  ConvertEmptyStringToNull ="false" DefaultValue =""
                Type="String" />
            <asp:ControlParameter ControlID="hidbName" Name="dbName" PropertyName="Value" 
                Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <table border="1">
       
        <tr>
            <td align="center">
                <asp:Label ID="Label1" runat="server" Text="其他門號資料" Font-Bold="True" Font-Size="20px"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Button ID="btnOK" runat="server" Text="新增" />
                <asp:Button ID="btnCancel" runat="server" Text="離開" />
            </td>
            
                <td align="center">
                    &nbsp;</td>
            </tr>
    </table>
    <TServerControl:TGridView ID="gvApplyDetail" runat="server" 
        AllowHoverEffect="False" AllowHoverSelect="False" 
        AutoGenerateColumns="False" ShowFooterWhenEmpty="False" 
        ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0" Width="600px" 
        DataSourceID="dbApplyDetail">
        <EmptyDataTemplate>
            <asp:Label ID="lblEmpty" runat="server" ForeColor="Red"></asp:Label>
        </EmptyDataTemplate>
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="btnEdit" runat="server" Visible ="false"  CommandName="Edit">編輯</asp:LinkButton> 
                    <asp:LinkButton ID="btnDelete" runat="server" CommandName="Delete">刪除</asp:LinkButton>
                    <asp:HiddenField ID="hiTelNo" runat="server" Value='<%# Bind("TelNo") %>' />
                </ItemTemplate>
                <EditItemTemplate >
                <asp:LinkButton ID="btnSave" runat="server" CommandName="Update">存檔</asp:LinkButton>
                    <asp:LinkButton ID="btnCancel" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                </EditItemTemplate>
                
            </asp:TemplateField>
            <asp:BoundField DataField="FactoryName" HeaderText="公司名稱" Visible="false" />
            <asp:BoundField DataField="TelNo" HeaderText="入網門號" />
             <asp:BoundField DataField="IDNo" HeaderText="身份證/公司統編" />
            <asp:BoundField DataField="Name" HeaderText="姓名" />
        </Columns>
    </TServerControl:TGridView>
</asp:Panel>
<asp:Button ID="btnDummy" runat="server" SkinID="null" Style="display: none" />
<ajaxToolkit:ModalPopupExtender ID="mpSearch" runat="server" CancelControlID="btnCancel" X="30"
    OkControlID="btnDummy" PopupControlID="panel1" PopupDragHandleControlID="panel1"
    TargetControlID="btnDummy" />
